package cate.game.role.system.msg;

import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdBSystem;
import easy.java.dev.note.NoteField;
import easy.java.practice.errorcode.EcResult;

@ClientMsg(title = "战斗播放速率设置 の 请求")
public class PlayRateSetReq implements MsgInput {


    @NoteField("播放速率")
    public int playRate;

    @Override
    public void execute(GameBody game, ClientContext cc) {
       EcResult r =  cc.getRole().getSystem().setRate(playRate);
       game.notice.message(cc.getRole(), r, true);
    }

    @Override
    public MsgConfig conf() {
        return MsgIdBSystem.PLAY_RATE_SET_REQ;
    }
}
